package com.ktjiaoyu.crm.controller;

import com.ktjiaoyu.crm.pojo.User;
import com.ktjiaoyu.crm.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {

    @Autowired
    private UserService userService;

    @RequestMapping("/addUser")
    public void addUser(){

        int count = userService.saveUser(new User("李祥","123",9l,0));
        if(count==1) System.out.println("插入成功！");
    }
}
